package com.zyj.mds;

import com.zyj.mds.config.MultiDataSourceConfig;
import com.zyj.mds.service.AspectTestService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@Import(MultiDataSourceConfig.class) //可以不写, 因为包名是相同的会自动加载
public class DataSourceAspectApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(DataSourceAspectApplication.class, args);
        context.getBean(AspectTestService.class).testAspectQuery();
    }

}
